import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int leftRet = 0;
        int rightRet = 0;
        for (int l = 0, r = 0; r < str.length(); r++) {
            char ch = str.charAt(r);
            if (!Character.isDigit(ch)) {
                l = r + 1;
            }
            if (r - l > rightRet - leftRet) {
                leftRet = l;
                rightRet = r;
            }
        }
        System.out.println(str.substring(leftRet, rightRet + 1));
    }
}